package org.lex.ftplist.ui;

import javax.swing.JInternalFrame;

import org.lex.ftplist.core.FtpUrl;
import org.lex.ftplist.ui.common.FtpListPane;

public class FtpListProgressFrame extends JInternalFrame {
	private FtpListPane pane = null;
	private final FtpUrl url;

	public FtpListProgressFrame(FtpUrl url) {
		super("FTP List", true, true, true, true);
		this.url = url;
		this.setSize(300, 200);
		this.initComponents();
	}

	@Override
	public void setVisible(boolean flag) {
		super.setVisible(flag);
		if (true == flag) {
			pane.runFtpList(url);
		}
	}

	private void initComponents() {
		pane = new FtpListPane();
		this.setContentPane(pane);
	}
}
